package com.example.fashion.android.home;

import android.content.Intent;
import android.os.Bundle;
import android.view.Gravity;
import android.widget.LinearLayout;

import com.example.fashion.android.base.BaseActivity.BaseActivity;
import com.example.fashion.android.UIAndDemo.MenuActivity;
import com.example.fashion.android.globar.Constant;
import com.example.fashion.android.util.LayoutUtil;

public class DemoActivity extends BaseActivity implements  LayoutUtil.ClickCallBack  {
    LinearLayout mRootLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //创建一个线性布局
        mRootLayout = LayoutUtil.getLinearLayout(this, LinearLayout.VERTICAL, Gravity.CENTER);
        setContentView(mRootLayout);
    }


    @Override
    public void initView() {
        //显示标题栏
        setSystemTitleName("UI控件与Demo");
    }

    @Override
    public void initData() {
        //添加功能列表
        LayoutUtil.addFunctionList(this, mRootLayout, Constant.MEDIA_DEMO_ID, this);
    }


    @Override
    protected void clear() {

    }

    @Override
    public void onClickListener(int tag) {
        switch (tag){
            case 0:         //侧拉菜单
                startActivity(new Intent(DemoActivity.this,MenuActivity.class));
                break;
        }
    }
}
